<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-01-07 15:56:28
-->
<template>
  <div ref="bottom2_container" style="height: 85%">
   
  </div>
</template>

<script>
import { Chord } from '@antv/g2plot';
export default {
  mounted() {
    this.initChart();
  },
  methods: {
    initChart() {
  const DATA = [
  { source: '北京', target: '天津', value: 30 },
  { source: '北京', target: '上海', value: 80 },
  { source: '北京', target: '河北', value: 46 },
  { source: '北京', target: '辽宁', value: 49 },
  { source: '北京', target: '黑龙江', value: 69 },
  { source: '北京', target: '吉林', value: 19 },
  { source: '天津', target: '河北', value: 62 },
  { source: '天津', target: '辽宁', value: 82 },
  { source: '天津', target: '上海', value: 16 },
  { source: '上海', target: '黑龙江', value: 16 },
  { source: '河北', target: '黑龙江', value: 76 },
  { source: '河北', target: '内蒙古', value: 24 },
  { source: '内蒙古', target: '北京', value: 32 },
];

const chord = new Chord(this.$refs.bottom2_container, {
  data: DATA,
  sourceField: 'source',
  targetField: 'target',
  weightField: 'value',
});

chord.render();

},
},
};
</script>